package test.br.com.lh.urabuilder.helper
{
	import br.com.lh.urabuilder.helper.DragAndDropHelper;
	import br.com.lh.urabuilder.model.UraModelLocator;
	
	import flash.events.MouseEvent;
	
	import flexunit.framework.TestCase;
	import flexunit.framework.TestSuite;
	
	import mock.br.com.lh.urabuilder.helper.dragdrop.DragDropDelegatorStub;
	
	import mx.containers.Canvas;
	import mx.controls.Image;
	import mx.core.DragSource;

	public class DragDropHelperTest extends TestCase
	{
		public function DragDropHelperTest(methodName:String=null)
		{
			super(methodName);
		}
		
		public static function suite():TestSuite{
			var ts:TestSuite = new TestSuite();
			ts.addTest(new DragDropHelperTest("nonCreatedComponentTest"));
			return ts;
		}
		
		public function nonCreatedComponentTest():void{
//			UraModelLocator.modelLocator = null;
//			var canvas:Canvas = new Canvas();
//			var modelLocator:UraModelLocator = UraModelLocator.getInstance(canvas);
//			var mockedDragDropDelegator:DragDropDelegatorStub = new DragDropDelegatorStub();
//			var dragHelper:DragAndDropHelper = new DragAndDropHelper(canvas,modelLocator.viewManager,modelLocator.scrollHelper,modelLocator.mouseEventHelper,mockedDragDropDelegator);
//			var img:Image = new Image();
//			img.source = 'teste';
//			img.width = 10;
//			img.height = 10;
//			var event:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN);
//			var originalImg:Image = new Image();
//			img.height = 10;
//			img.width = 20;
//			img.source='playSound';
//			event.localX = 10;
//			event.localY = 30;
//			event.currentTarget = img;
//			var dragSource:DragSource = new DragSource();
//			dragSource.addData(10,"localX");
//			dragSource.addData(30,"localY");
//			dragSource.addData('playSound',"type");
//			dragSource.addData(false,"created");
//			mockedDragDropDelegator.expects("startDragging").withArgs(img,dragSource,event,img);
//			dragHelper.initDrag(event,'playSound',false);
//			assertTrue(mockedDragDropDelegator.errorMessage(),mockedDragDropDelegator.success());
//			
//			
//			
			 
		}
		
		
	}
}